﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace iResume
{
    public partial class searchRecruiter : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
          
                string email = (string)(Session["username"]);
                if (email == null)
                {
                    Response.Redirect("loginpage.aspx");
                }
                GridView1.Visible = true;
            
        }

        protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
        {

        }

        protected void GridView_RowCommand(object sender, GridViewCommandEventArgs e)

        {

            if (e.CommandName == "Select")
            {
                // Convert the row index stored in the CommandArgument
                // property to an Integer.
                int index = Convert.ToInt32(e.CommandArgument);

                // Retrieve the row that contains the button clicked 
                // by the user from the Rows collection.
                GridViewRow row = GridView1.Rows[index];

                // Create a new ListItem object for the contact in the row.     
                ListItem item = new ListItem();
                //item.Text = Server.HtmlDecode(row.Cells[0].Text) + " " + Server.HtmlDecode(row.Cells[1].Text) + " " + Server.HtmlDecode(row.Cells[2].Text) + " " +
                //Server.HtmlDecode(row.Cells[3].Text) + Server.HtmlDecode(row.Cells[4].Text) + " " + Server.HtmlDecode(row.Cells[7].Text) + " " + Server.HtmlDecode(row.Cells[9].Text) + " ";
             
              //  Session["username"] = row.Cells[5].Text;
                item.Text = Server.HtmlDecode(row.Cells[1].Text) + " ";
                Session["jobID"] = row.Cells[1].Text;

                
                Response.Redirect("jobSeekerViewJobPost.aspx");

            }
        }

        protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
        {
            GridView1.Visible = true;
        }      
   

        }
        }
    
